home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / prog_disc / volume_6 / issue_12 / ram_scrap / notes
Encoding:
Text File  |  1993-07-22  |  2.8 KB  |  76 lines

  1. RAMScrap
  2. ========
  3.  
  4. !RAMScrap is a replacement for !Scrap. 
  5.     
  6. Why would !Scrap need a replacement?
  7. ------------------------------------
  8.             
  9. If the user does not have write access to !Scrap it will not work
  10. properly. !RAMScrap creates a scrap directory on the RAM disk so the
  11. user is guaranteed to have write access. Additional advantages of a
  12. scrap directory on the RAM disk are there will be no disk swopping and
  13. it will be very fast.
  14.  
  15.  
  16. What does RAMScrap do?
  17. ----------------------
  18.  
  19. !RAMScrap will try to create a RAM disk if one does not exist. If
  20. there is a RAM disk RAMScrap will check that there is enough free
  21. space, and if necessary and possible it will extend the RAM disk. Lots
  22. of things can go wrong, RAMScrap will try to do the sensible thing. If
  23. !RAMScrap thinks it has succeeded it sets Wimp$Scrap and
  24. Wimp$ScrapDir, if it thinks it has failed it tries to give the user
  25. helpful advice.
  26.  
  27. Operation
  28. ---------
  29.  
  30. !Boot will try to create a RAM scrap directory if one has not already
  31. been set (by a standard !Scrap application). !Run will always try to
  32. create a RAM scrap directory.
  33.  
  34. !Boot and !Run use a BASIC program 'RAMDisk' to check/create/extend
  35. the RAM Disk. There are two variables used by 'RAMDisk' which you may
  36. want to adjust. They are both set within the first few lines of the
  37. program.
  38.  
  39. required_size% : If RAMDisk creates a RAM disk it will attempt to make
  40. its size required_size% (K). If the RAM disk is smaller than
  41. required_size% RAMDisk will try to extend it. Allow for a bit of
  42. memory overhead, 128K of RAM disk only has 124K of user space and any
  43. directory structure will eat a bit more.
  44.  
  45. running_commentary% : This is set to TRUE or FALSE. It is a debugging
  46. aid, most users will keep it set to FALSE. Set it to TRUE if you want
  47. a running commentary of all that RAMDisk is doing/trying to do. The
  48. RISC OS 2 or 3 version does not use this variable, just a lot of
  49. (possibly REMed out) calls to PROCout. 
  50.  
  51. MemAlloc
  52. --------
  53.  
  54. The RISC OS 3 version of RAMDisk calls SWI 'ChangeDynamicArea'. RISC
  55. OS 2 does not have'ChangeDynamicArea' so the 'MemAlloc' module must be
  56. used for this version. 
  57.  
  58. How can the user fail to have write access to !Scrap?
  59. -----------------------------------------------------
  60.  
  61. Some Networks have a 'public' identity which allows anyone to log on
  62. and access certain applications and files. Typical public IDs are
  63. GUEST, BOOT and (my favourite) FRED. A public ID is not usually given
  64. write access to any area of the network. (I have heard networks with a
  65. public ID described as 'open access systems').
  66.  
  67. Our network at Portsmouth College allows users to log on with a public
  68. ID (sorry, can't bring myself to call it an 'open access system' - too
  69. pretentious). Imagine our distress when we found that the RISC OS 3
  70. printer driver required a !Scrap directory. !RAMScrap is my solution -
  71. hope you find it useful.
  72.  
  73.  
  74. Robert Chrismas : 19930722
  75.  
  76.